Socket
Socket
Sign inDemoInstall

rehype-minify-whitespace

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-minify-whitespace

rehype plugin to collapse whitespace


Version published
Weekly downloads
214K
decreased by-4.85%
Maintainers
3
Weekly downloads
 
Created

What is rehype-minify-whitespace?

The rehype-minify-whitespace package is a plugin for the rehype ecosystem that minifies whitespace in HTML. It helps in reducing the size of HTML files by removing unnecessary whitespace, which can improve load times and overall performance.

What are rehype-minify-whitespace's main functionalities?

Minify Whitespace

This feature minifies the whitespace in the provided HTML string. In the example, the excessive spaces between 'Hello' and 'World' are removed.

const rehype = require('rehype');
const minifyWhitespace = require('rehype-minify-whitespace');

rehype()
  .use(minifyWhitespace)
  .process('<div>   Hello   World   </div>', function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Other packages similar to rehype-minify-whitespace

Keywords

FAQs

Package last updated on 27 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc